/*
 * NonRigidBody.h
 *
 *  Created on: 11/02/2011
 *      Author: Nenem
 */

#ifndef NONRIGIDBODY_H_
#define NONRIGIDBODY_H_

#include "Body.h"

class NonRigidBody: public Body {
	Information east;
	Information north;
	Information south;
	Information west;

	Position* pos;
	Direction *direction;
public:
	NonRigidBody();
	NonRigidBody(Position *position);
	virtual ~NonRigidBody();

	Rectangle collideAreaMovement(Point2D oldP, Point2D newP, Direction *direction);

	Rectangle collideArea(Point2D pos, Direction *direction);

	Point2D distance(Point2D P, Direction *direction, Rectangle otherArea);

	bool isRigid(){
		return false;
	}

	void update() {}

	int getX1(Point2D point, Direction *direction);
	int getX2(Point2D point, Direction *direction);
	int getY1(Point2D point, Direction *direction);
	int getY2(Point2D point, Direction *direction);

	Position *getPos() const
	{
		return pos;
	}

	void setPos(Position *pos)
	{
		this->pos = pos;
	}

	Direction *getDirection() const
	{
		return direction;
	}

	void setDirection(Direction *direction)
	{
		this->direction = direction;
	}

	Information getEast() const
	{
		return east;
	}

	Information getNorth() const
	{
		return north;
	}

	Information getSouth() const
	{
		return south;
	}

	Information getWest() const
	{
		return west;
	}

	void setEast(Information east)
	{
		this->east = east;
	}

	void setNorth(Information north)
	{
		this->north = north;
	}

	void setSouth(Information south)
	{
		this->south = south;
	}

	void setWest(Information west)
	{
		this->west = west;
	}
};

#endif /* NONRIGIDBODY_H_ */
